package com.cac.demo.newCode.sorting.controller;

import com.cac.demo.util.adapter.ResponseMsg;
import com.cac.demo.newCode.sorting.dto.SortingDemoDTO;
import com.cac.demo.newCode.sorting.service.ISortingDemoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 控制层文件
 */
@RequestMapping("/SortingDemo")
@RestController
@Slf4j
public class SortingDemoController {
    @Resource
    ISortingDemoService sortingDemoService;

    @GetMapping("/test")
    public ResponseMsg<Object> sortingDemoTest(@RequestBody SortingDemoDTO sortingDemoDTO){
        //除了写调用service建议不要其他的任何内容
        return sortingDemoService.sortingDemoTest(sortingDemoDTO);
    }
}
